import React from 'react'
import { View } from 'react-native'

export const SearchBarProps = {}

export const SearchBarDefaultProps = {}

export default class SearchBar extends React.Component {
  constructor(props) {
    super(props)
  }

  nomalStyle() {
    return null
  }

  renderLeftView() {
    return null
  }

  renderMiddleView() {
    return null
  }

  renderRightView() {
    return null
  }

  render() {
    const { style, ...other } = this.props
    let nomalStyle = this.nomalStyle() || {}
    if (style) {
      nomalStyle = [nomalStyle].concat(style)
    }

    return (
      <View style={nomalStyle} {...other}>
        {this.renderLeftView()}
        {this.renderMiddleView()}
        {this.renderRightView()}
      </View>
    )
  }
}

SearchBar.propTypes = SearchBarProps
SearchBar.defaultProps = SearchBarDefaultProps